There is known an execution control technology called multi-thread in which one processor executes a plurality of processes by switching them, executing them in parallel in appearance. The multi-thread may also be called a multi-task, a multi-process and so on.
In the multi-thread control, when a cause for switching the thread occurs, the following process is performed in general: a context of the thread which has been executed so far is saved in the memory, namely a register value of the processor is saved in the memory; and a context of the thread to be executed next, which has been saved in the memory, is restored (hereinafter the process is referred to as “context save/set process”).
With this process, when an execution of a thread is stopped due to switching between threads, the execution can be restarted from a point at which the execution was stopped.
In this way, when threads are switched in the multi-thread control, generally the context save/set process is performed. However, one problem of this process is that it takes time to transfer data between processor and memory for writing and reading of contexts, increasing the time required for switching between threads, thus decreasing the program processing efficiency.
There are various known methods conceived to perform the switching between threads efficiently. For example, Patent literature 1 attempts to reduce the time required for switching between threads by saving and restoring data (contexts) of sizes that correspond to the sizes of registers used by programs (threads) when the processor executes a plurality of programs (threads), which use registers of different sizes, in parallel by switching them.
[Citation List]
[Patent Literature]
[Patent Literature 1]
Japanese Patent Application Publication No. 2007-207074